package cn.iocoder.yudao.module.member.controller.admin.user.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 会员 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class UserBaseVO {

    @Schema(description = "用户姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @NotNull(message = "用户昵称不能为空")
    private String name;

    @Schema(description = "用户昵称",  example = "张三")
    private String nickname;

    @Schema(description = "头像")
    private String avatar;

    @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "状态不能为空")
    private Integer status;

    @Schema(description = "0:默认普通会员;1:VIP", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "0:默认普通会员;1:VIP不能为空")
    private Integer type;

    @Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "手机号不能为空")
    private String mobile;

    @Schema(description = "邮箱", requiredMode = Schema.RequiredMode.REQUIRED)
    private String email;

    @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "密码不能为空")
    private String password;

    @Schema(description = "注册 IP", requiredMode = Schema.RequiredMode.REQUIRED)
    private String registerIp;

    @Schema(description = "最后登录IP")
    private String loginIp;

    @Schema(description = "最后登录时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime loginDate;

    @Schema(description = "0:未知;1:男,2:女", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "0:未知;1:男,2:女不能为空")
    private Integer gender;

    @Schema(description = "微信授权ID", example = "3889")
    private String unionId;

    @Schema(description = "小程序授权ID", example = "5165")
    private String openId;

    @Schema(description = "小程序应用ID", example = "20137")
    private String appId;

}
